<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<h2><?php echo $title ?></h2>
<table class="register-table" width="100%">
    <?php echo form_open('account/register') ?>
        <tr valign="top">
            <td>
                <fieldset>
                <legend>Account Information</legend>
                <table width="100%">
                    <tr>
                        <th><label for="email">Email</label></th>
                        <td><input type="text" id="email" name="email" value="<?php echo set_value('email') ?>" /></td>
                        <td width="200"><?php echo form_error('email', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label for="password">Password</label></th>
                        <td><input type="password" id="password" name="password" value="<?php echo set_value('password') ?>" /></td>
                        <td><?php echo form_error('password', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label for="passconf">Confirm Password</label></th>
                        <td><input type="password" id="passconf" name="passconf" value="<?php echo set_value('passconf') ?>" /></td>
                        <td><?php echo form_error('passconf', '<div class="error">', '</div>'); ?></td>
                    </tr>
                </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td>
                <fieldset>
                <legend>Personal Information</legend>
                <table width="100%">
                    <tr>
                        <th><label for="firstname">First name</label></th>
                        <td><input type="text" name="firstname" id="firstname" value="<?php echo set_value('firstname') ?>" /></td>
                        <td width="200"><?php echo form_error('firstname', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label for="lastname">Last name</label></th>
                        <td><input type="text" name="lastname" id="lastname" value="<?php echo set_value('lastname') ?>" /></td>
                        <td><?php echo form_error('lastname', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label>Gender</label></th>
                        <td>
                            <label><input type="radio" name="gender" value="male" <?php echo set_checkbox('gender', 'male') ?> />Male</label>
                            <label><input type="radio" name="gender" value="female" <?php echo set_checkbox('gender', 'female') ?> />Female</label>
                        </td>
                        <td><?php echo form_error('gender', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label for="contact">Contact No.</label></th>
                        <td><input type="text" name="contact" id="contact" value="<?php echo set_value('contact') ?>" /></td>
                        <td><?php echo form_error('contact', '<div class="error">', '</div>'); ?></td>
                    </tr>
                    <tr>
                        <th><label for="address">Address</label></th>
                        <td><textarea name="address" id="address" rows="5" cols="30"><?php echo set_value('address') ?></textarea></td>
                        <td><?php echo form_error('address', '<div class="error">', '</div>'); ?></td>
                    </tr>
                </table>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td align="right">
                <input type="button" value="Reset" onclick="reload()" />
                <input type="submit" value="Register" />
            </td>
        </tr>
    <?php echo form_close() ?>
</table>